package com.weimei.conversionTreasure.activity.compute;



import android.os.Bundle;

import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelProviders;

import com.weimei.conversionTreasure.R;
import com.weimei.conversionTreasure.app.AppViewModelFactory;
import com.weimei.conversionTreasure.databinding.ActivitySheRuBinding;
import com.weimei.conversionTreasure.viewModel.SheRuVM;
import com.weimei.conversionTreasure.viewModel.TJDVM;

import me.goldze.mvvmhabit.base.BaseActivity;
import me.tatarka.bindingcollectionadapter2.BR;

public class SheRuActivity extends BaseActivity<ActivitySheRuBinding, SheRuVM> {


    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_she_ru;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public void initData() {
        super.initData();
        binding.back.setOnClickListener(v -> finish());
        viewModel.setActivity(this);
    }

    @Override
    public SheRuVM initViewModel() {
        AppViewModelFactory factory = AppViewModelFactory.getInstance(getApplication());
        return ViewModelProviders.of(this, (ViewModelProvider.Factory) factory).get(SheRuVM.class);
    }
}